<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
	<head>
		<title>CoursesPlus</title>
		<script type="text/javascript" src="public/jquery.min.js"></script>
		<script type="text/javascript" src="public/index.js"></script>
		<link rel="stylesheet" type="text/css" href="style/style.css" />
		<link rel="stylesheet" type="text/css" href="style/basic.css" />
	</head>
	<body>
		<div id="wrap">
			<div id="header">
				<div class="logo">
					<a href="#" id="logoLink"><img src="images/name.png" alt="CoursesPlus" /></a>
				</div><!--end logo-->
				<div class="subtitle">
					<h2>Welcome <%=request.getUserPrincipal().getName() %>!</h2><small><a href="logout" id="logoutLink">(Logout)</a></small>
				</div><!--end subtitle-->
				<div id="nav">
					<ul id="nav-pages">
						<li><a href="#" id="homeLink" class="current">Home</a><span>~</span></li>
						<li><a href="#" id="editAccountLink">Edit Account</a><span>~</span></li>
						<li><a href="#" id="courseSearchLink">Course Search</a><span>~</span></li>
						<li><a href="#" id="allCoursesLink">Courses</a><span>~</span></li>
						<li><a href="#" id="allUsersLink">Users</a><span>~</span></li>
						<li><a href="#" id="aboutUsLink">About Us</a></li>
						<!-- up to here is general -->
					</ul><!--end nav-pages-->
					<ul id="nav-pages-role-specific">
						<%if (request.isUserInRole("student")) { %>
						<li><a href="#" id="timetableLink">Timetable</a><span>~</span></li>
						<li><a href="#" id="myCoursesLink">My Courses</a><span>~</span></li>
						<li><a href="#" id="availableCoursesLink">Available Courses</a></li>
						<%} else { %>
						<li><a href="#" id="newCourseLink">New Course</a></li>
						<%} %>
					</ul><!--end nav-pages-role-specific-->
				</div><!--end nav-->
			</div><!--end header-->
			
			
			<div id="main">
				<img src="images/loader_white.gif" alt="Loading..." />
			</div><!--end main-->
		</div><!--end wrap-->
		<script type="text/javascript">
			setHeaderLinks();
			<%if (request.isUserInRole("student")) { /*student: load student links*/%>
				setStudentLinks();
			<%} else { /*admin: load admin links*/%>
				setAdminLinks();
			<%} %>
			var availableCoursesTimer;
			$('#homeLink').click();
		</script>
	</body>
</html>
